An efficient hybrid differential evolution-golden jackal optimization algorithm for multilevel thresholding image segmentation

Image segmentation is a crucial process in the field of image processing. Multilevel threshold segmentation is an effective image segmentation method, where an image is segmented into different regions based on multilevel thresholds for information analysis. However, the complexity of multilevel thresholding increases dramatically as the number of thresholds increases. To address this challenge, this article proposes a novel hybrid algorithm, termed differential evolution-golden jackal optimizer (DEGJO), for multilevel thresholding image segmentation using the minimum cross-entropy (MCE) as a fitness function. The DE algorithm is combined with the GJO algorithm for iterative updating of position, which enhances the search capacity of the GJO algorithm. The performance of the DEGJO algorithm is assessed on the CEC2021 benchmark function and compared with state-of-the-art optimization algorithms. Additionally, the efficacy of the proposed algorithm is evaluated by performing multilevel segmentation experiments on benchmark images. The experimental results demonstrate that the DEGJO algorithm achieves superior performance in terms of fitness values compared to other metaheuristic algorithms. Moreover, it also yields good results in quantitative performance metrics such as peak signal-to-noise ratio (PSNR), structural similarity index (SSIM), and feature similarity index (FSIM) measurements.


INTRODUCTION
Image segmentation is a crucial step in image processing, and the correctness of image segmentation directly affects the extraction, detection, and recognition of objects (Pare et al., 2019).According to the features of the image, such as grayscale, histogram, and geometric shape, the image is segmented into independent regions to obtain reduce the complexity of image analysis.It has been widely used in remote sensing, medicine, and surveillance fields (Elaziz, Ewees & Oliva, 2020;Houssein et al., 2021a).
Approaches based on image histogram thresholding can be classified as bi-level and multilevel (Pare et al., 2019;Wunnava et al., 2022).Bi-level thresholding methods distinguish the region of interest from the image background using a single threshold.On the contrary, in the multilevel thresholding methods, the images are divided into several regions with multiple threshold values.For the processing of real images, researchers may require information from multiple regions, and bi-level thresholding does not meet the requirements.Therefore, the histogram of an image needs to be divided into regions by multilevel threshold segmentation.In multilevel threshold segmentation, the main methods for determining the optimal threshold are: parametric and non-parametric (Wang et al., 2023a).Parametric approaches define each category of the image by determining the probability density distribution of the image region.However, these methods are complex to implement and the estimation of parameters is limited by the initial conditions.On the other hand, non-parametric approaches employ discriminative rules to partition image pixels into homogeneous regions and then determine thresholds based on criteria of entropy or variance (Wang et al., 2023a).Over the years, various criteria have been developed, including the Otsu (Otsu, 1975), Kapur entropy (Kapur, Sahoo & Wong, 1985), and minimum cross entropy (MCE) (Li & Lee, 1993) criteria, aimed at identifying optimal thresholds for segmented images.Nevertheless, these approaches have some limitations, such as the high computational complexity of these methods, especially for high threshold numbers.
For image segmentation, the determination of multilevel thresholding could be considered as an NP-hard optimization problem, and the objective functions are chosen as the Otsu, Kapur entropy and MCE (Rodríguez-Esparza et al., 2020).The optimal multilevel threshold is typically derived through iterative optimization algorithms.
To achieve an optimal multilevel threshold, many MA algorithms have been presented to address the multilevel thresholding problem (Sharma et al., 2020;Tan & Zhang, 2020).Specifically, Ahmadi et al. (2019) presented a bird mating optimization (BMO) for image segmentation using Otsu and Kapur techniques.The performance of the BMO approach was demonstrated compared to existing algorithms in terms of segmentation quality.Rodríguez-Esparza et al. (2020) developed an efficient HHO algorithm for multilevel image segmentation utilizing the MCE as the objective function.The results indicated the HHO algorithm's superior performance with benchmark images.Eisham et al. (2022) introduced a chimp optimization algorithm (COA) for image segmentation, outperforming existing methods in segmenting benchmark images.Wang & Song (2022) proposed an image segmentation method with an adaptive firefly algorithm (AFA), using the MCE method as an objective function.The AFA algorithm exhibited excellent segmentation quality and low computation time.Houssein et al. (2021a); Houssein et al. (2021b) proposed a black widow optimization (BWO) algorithm to determine optimal thresholds for multilevel thresholding.Furthermore, Houssein et al. (2023) enhanced the heap-based optimizer (EHBO) and applied it to multi-threshold segmentation.The results indicated that the EHBO algorithm has superior image segmentation performance.
As mentioned above, the implementation of meta-heuristic algorithms for thresholding images could reduce the complexity of finding the optimal threshold.Not all meta-heuristic optimization algorithms could solve this problem according to the 'No Free Lunch (NFL)' theorem proposed by Wolpert & Macready (1997).Consequently, it is necessary to perform tests on multi-threshold segmentation methods for images.
As a novel metaheuristic algorithm, Golden Jackal Optimization (GJO) was presented based on the social and hunting behaviors of golden jackals (Chopra & Mohsin Ansari, 2022), which has the advantages of simplicity of principles, fewer parameter requirements, and excellent performance.Compared to other metaheuristic algorithms, the GJO has been demonstrated to be an effective optimization method.Similar to other MA algorithms, the GJO algorithm has some limitations, the main limitation is that GJO tends to fall into local optima with solving practical problems (Houssein et al., 2022;Zhang et al., 2023).
As one of the earliest metaheuristic algorithms, the DE algorithm (Storn & Price, 1997) has been widely used in several fields due to its simple structure.However, the DE algorithm suffers from poor performance in solving complex optimization problems, which has led many researchers to improve it to obtain superior performance.Because the DE algorithm is easily combined with other algorithms, the main improvement of the DE algorithm is to combine it with other meta-heuristic algorithms to enhance the optimization performance.
To overcome the problem of low convergence accuracy, a novel hybrid algorithm based on differential evolution (DE) and GJO algorithms (DEGJO) is proposed, which utilizes the DE algorithm to update the optimal locations of the jackal to enhance the search performance.The DEGJO is used for image segmentation based on the MCE method, which aims to achieve threshold and minimum fitness values.The stability and adaptability of the DEGJO are demonstrated through benchmark function experiments, and the segmentation results are compared with those of original DE, GWO, WOA, GJO, and hybrid GJO (HGJO) algorithms for minimum cross entropy.To evaluate the quality of image segmentation, several evaluation metrics are employed.The experimental results of benchmark functions and images show that the DEGJO obtain good effectiveness and stability.
The main contributions of this article are as follows.
(1) A novel hybrid DEGJO is presented by improving the optimal position update in GJO through the differential position and selection operators of the DE algorithm.
(2) The performance of the DEGJO is evaluated using the CEC2021 benchmark function, and the DEGJO is compared with other MA algorithms: original DE, GWO, WOA, GJO, and hybrid GJO.
(3) The DEGJO is applied to solve the image segmentation problem using the minimum cross-entropy function.The performance of the proposed algorithm is validated on different multilevel segmentation experiments, and the DEGJO algorithm achieves superior performance compared to different MA algorithms.
This article is organized as follows.'Material and Methods' introduces the MCE, the GJO algorithm, the DE algorithm, and the DEGJO algorithm.Test function and image segmentation experiments are performed in 'Experimental Analysis and Discussion'.Finally, the conclusions and future work are presented in 'Conclusions'.

Minimum cross-entropy in multilevel image thresholding
It is effective and convenient to obtain image information through image segmentation.
Based on the features of the image, the image is segmented into multiple regions, thus presenting distinctive features of different regions.The histogram provides a visual representation of the distribution of pixels throughout the image.Consequently, image histogram segmentation is achieved by determining the threshold value using the MCE method (Wang & Song, 2022).
The cross-entropy can be characterized using the information-theoretic distance between the two probability distributions P = [p 1 ,p 2 ,...,p N ] and Q = [q 1 ,q 2 ,...,q N ], expressed as (Rodríguez-Esparza et al., 2020): Using the cross-entropy as the objective function, the optimal thresholding is determined by minimizing the cross-entropy.
According to the image histogram I , the segmented image can be computed as: where h(i) is the histogram, L represents the gray level, and th is the threshold number.
The formula for the MCE is calculated as: (3) Through minimizing the cross-entropy, the optimal thresholds are achieved, denoted as In Eq. ( 3), the multilevel method is for the vector th = [th 1 ,th 2 ,...,th n ], which can be calculated as where n denotes the threshold number and H i is calculated as:

GJO algorithm
The GJO algorithm is a novel approach inspired by the behaviors of golden jackals (Chopra & Mohsin Ansari, 2022).Similar to other MA algorithms, the GJO provides a method for addressing practical optimization problems.Golden jackals engage in collaborative hunting, typically in pairs (males and females) or groups.For golden jackals, the hunting process can be described as the exploration and exploitation phase (Yang & Wang, 2024).
The mathematical models for these processes are described below.

Exploration phase
In the exploration phase, the golden jackal utilizes its unique ability to locate and stalk the prey.Male and female jackals hunt for prey together.The mathematical model of behavior is described as: where P M (t ) and P FM (t ) represent the positions of the male and female jackals, respectively.Prey(t ) represents the position vector of the prey, E denotes the prey's escape energy, E 0 represents the initial escape energy in [-1,1], t is the current iteration, T is the maximum iteration, rl is a random vector, and LF denotes the Lévy flight function (Heidari et al., 2019).
Finally, the positions of the golden jackal are updated with the positions of the male and female jackals, represented as:

Exploitation phase
When the prey is tracked and pursued by golden jackals, the prey's evasion energy degrades rapidly, and a pair of jackals surround the prey.After encircling the prey, the jackals pounce and capture it.The behavior of jackals can be described as follows.
Finally, the positions of the golden jackal are also updated using the mean position with Eq. ( 13).

DE algorithm
The DE algorithm is a simple and effective population-based method, which is realized by mutating the differences between randomly selected pairs of target vectors (Storn & Price, 1997).Through these individual differences, the DE algorithm is guided to search for the optimal value.It primarily consists of mutation, crossover, and selection operations, and the processes can be expressed as follows (Wunnava et al., 2022).

Mutation operation
In the population, mutation vectors are generated through the mutation operation.The commonly used mutation operator is denoted as: where FM is the scaling control parameter in [0, 2], X best (t ) represents the individual vector for t iterations, r 1 and r 2 are randomly selected values from the population.

Crossover operation
After generating the mutant vector, a crossover operation is performed on the source vector and its corresponding mutation vector to generate the crossover vector.This process is mathematically represented as: where CR denotes a crossover factor in [0, 1].

Selection operation
If the fitness value of the crossover vector is better than that of the source individual vector, the individual vector is updated to the crossover vector.Otherwise, the individual vector remains unchanged.The selection operation is denoted as: where f (•) represents the fitness function.

The proposed DEGJO algorithm
As mentioned above, many studies have demonstrated the GJO algorithm's remarkable search capabilities with a simple structure (Lou et al., 2024).In the GJO algorithm, golden jackals exhibit hunting behavior in pairs, typically led by male jackals with females following suit.However, this strategy may cause the algorithm to converge to a local optimum.On the other hand, the DE algorithm quickly searches for the minimum region in the search space and is easily integrated with other MA algorithms.In this article, we propose a hybrid DEGJO algorithm based on the DE and the GJO algorithms.This integration aims to further optimize the position of the jackal, enhancing its ability to escape local optimal solutions.The GJO algorithm is combined with DE with mutation, crossover, and selection mechanisms.After the optimal position obtained by the GJO algorithm, the mutation, crossover, and selection operations of the DE are used to determine the best position of the golden jackal, and the corresponding fitness value is calculated.If the fitness value after differential evolution is better than that of the optimal position of the jackal, the differential evolution position is used as the optimal position.Otherwise, the optimal position of the golden jackal remains unchanged.The pseudo-code of the DEGJO algorithm is displayed in Algorithm 1.

Computational complexity of the DEGJO
Computational complexity is closely related to the dimension number and running time, and the level of computational complexity directly affects the efficiency of an algorithm.The big-O notation provides a reliable method for quantifying and assessing the stability of algorithms (Pan et al., 2023).
The main parameters of the algorithm include the population size (N ), maximum iteration number (T ), and dimension number (D).According to the optimization process of the GJO algorithm, the computational complexity is calculated as follows (Chopra & Mohsin Ansari, 2022): For the DEGJO algorithm, the computational complexity is based on the GJO algorithm with the addition of the complexity of the DE algorithm.The computational complexity of the DE algorithm is O(T × N ).Therefore, the computational complexity is represented as

DEGJO-based multilevel thresholding method
The DEGJO algorithm is used to search for multilevel thresholding through cross-entropy minimization.The flowchart in Fig. 1 displays the DEGJO algorithm for multilevel thresholding.The detailed steps are described below: Step 1: Input a grayscale image I gray and calculate the corresponding histogram of the image h gray .
Step 2: The main parameters are set: N , T , the number of thresholds k, and the search range within [0, 255].
Step 3: The initial positions of the prey are randomly generated and the corresponding fitness values are calculated using Eq.(4).Then, comparing the fitness values, the positions of the best prey and second-best prey are set as Y 1 and Y 2 , respectively.
Step 4: Calculate the prey energy E using Eq. ( 11).Depending on the value of E, the positions of the prey are updated through the exploration phase (Eqs.( 9) and ( 10)) and exploitation phase (Eqs.( 14) and ( 15)).Step 5: The DE algorithm is used to update the obtained optimal position of the jackal with Eqs. ( 16)-( 18), and the corresponding fitness value is calculated.Determine whether to update the optimal position of the jackal through the fitness value.
Step 6: If the iteration number reaches T, the optimal position of the golden jackal is used as the optimal thresholding.
Step 7: The segmentation image I s is achieved with the optimal thresholding, represented as:

EXPERIMENTAL ANALYSIS AND DISCUSSION
In this section, experiments are performed to prove the algorithm's performance using the CEC2021 benchmark function and test images.Other MA algorithms such as DE (Storn & Price, 1997), GWO (Mirjalili, Mirjalili & Lewis, 2014), WOA (Mirjalili & Lewis, 2016), GJO (Chopra & Mohsin Ansari, 2022) and HGJO (Lou et al., 2024) are executed experimentally to compare their performance with the proposed algorithm.The parameters of the relevant algorithms are depicted in Table 1.

Test functions and experiment settings
Multiple experiments are performed using the CEC2021 benchmark function (Lou et al., 2024;Mohamed et al., 2022;Wang et al., 2023b) to verify the DEGJO algorithm's performance.Table 2 displays the detailed information on the benchmark functions.

Algorithms
Parameters value DE FM=0.5, CR=0.9 For the previously mentioned algorithm, the population number, dimension number, and maximum iteration number are set to 30, 10, and 200, respectively.

Analysis of the results of the CEC2021 benchmark functions
To analyze the results, two measures of average fitness (Avg) and standard deviation (Std) are utilized.After 20 independent runs, the measurement results of different MA algorithms are depicted in Table 3. Figure 2 illustrates the convergence curves of the DEGJO and other MA algorithms.Table 3 illustrates that the DEGJO algorithm obtains the best results in the test functions compared to the other algorithms.Specifically, for F2, F3, F4, F6, and F8, both the DEGJO and HGJO algorithms achieve the minimum theoretical values, outperforming the results of the other algorithms.Although the results of the DEGJO algorithm are not optimal in F1, F7, F9, and F10, there are still significant improvements with the GJO and HGJO algorithms.These results highlight the superior search capabilities of the proposed algorithm.
As observed in Fig. 2, the DEGJO algorithm exhibits excellent convergence ability.In the unimodal function F1, the convergence accuracy of the DEGJO algorithm is better than other algorithms and the HGJO algorithm.For the basic function F2-F4, the DEGJO algorithm shows good searching ability and has almost the same convergence performance as the HGJO algorithm.For the functions F5-F7 and F8-F10, the DEGJO algorithm consistently outperforms the other MA algorithms in terms of search results.

Test images
To assess the adaptability, the DEGJO is employed for image segmentation.Experiments are performed on six test images used in the literature (Houssein et al., 2021b;Wang & Song, 2022).These images are selected from the Open Standard Test Dataset and Berkeley Segmentation Dataset (Martin et al., 2001), as depicted in Fig. 3.
Figure 3 shows the benchmark images used for the testing along with their corresponding histograms.These histograms reveal variations of gray-level intensity in different images, which facilitate the verification of the robustness and applicability of the proposed method on different datasets.

Functions number f min Search range
Unimodal Function

Evaluation metrics
For image thresholding segmentation of the DEGJO algorithm, multiple evaluation metrics are required to assess the performance of the proposed algorithm.These evaluation metrics are described as follows.
1. Average (Avg) and standard deviation (Std) values of the fitness function The convergence accuracy of the algorithm is influenced by the fitness value.Accurate image segmentation thresholds can be obtained by iterating through the minimization of the fitness value.Therefore, the efficiency of the algorithm is assessed using Avg and Std of the fitness function.
2. The best threshold values Optimization algorithms are employed for segmentation images, where the optimal thresholds are derived through iterative optimization of the algorithm.The selection of the best threshold is crucial for image segmentation, as it directly affects the quality of the segmentation.
3. Peak Signal-to-Noise Ratio (PSNR) The PSNR denotes the peak signal-to-noise ratio of the source I sou and the segmented image I seg and is closely related to the quality of the segmented image (Houssein et al., (Martin et al., 2001).

Structural Similarity Index (SSIM)
The SSIM represents the similarity between the I sou and I seg images (Houssein et al., 2021b).The higher the value of SSIM, the higher the similarity between the source and the segmented image, which means that the segmentation of the image is more effective.The SSIM can be calculated as: where µ sou and µ seg are the mean intensity of the I sou and I seg images, respectively.σ sou and σ seg represent the standard deviation of the I sou and I seg images, respectively.σ ss is the covariance.c 1 and c 2 are the constant numbers.5. Feature Similarity Index (FSIM) The FSIM denotes the similarity between the I sou and I seg images (Aziz, Ewees & Hassanien, 2017).A high FSIM value denotes good performance of the image segmentation method.The calculation formula is denoted as follows: where T 1 and T 2 are constant numbers.PC(x) denotes the phase congruence, and G(x) denotes the magnitude of the image gradient.

Analysis of the segmented image results
The DEGJO algorithm is employed to search for the optimal multilevel threshold, with an objective function of cross-entropy minimization.For each algorithm, the N is selected as 30, T is chosen as 100, and the threshold levels are set to 3, 5, and 8, respectively.
To reduce the randomness of the algorithms, each algorithm is run independently 20 times.The experimental results of the DEGJO and other MA algorithms are displayed in Tables 4-8.Table 4 shows the Avg and Std of the cross-entropy values for the DEGJO and other algorithms.The best values are highlighted in bold.Compared to DE, GWO, WOA, GJO and HGJO algorithms, the DEGJO algorithm obtains the best average values in most images at all levels.
Table 5 depicts the best threshold values with the DE, GWO, WOA, GJO, HGJO, and DEGJO algorithms.Generally, most algorithms exhibit similar values when the threshold levels are 3 and 5, however, significant differences emerge in the threshold values obtained when the threshold level is 8, particularly with the HGJO algorithm.
Table 6 displays the mean PSNR values of the algorithm mentioned above.The Optimal values are marked in bold.In most images, the segmented image using the DEGJO algorithm has a higher PSNR value than other algorithms.However, for some images, other algorithms perform better than the DEGJO algorithm.
Table 7 compares the mean SSIM values derived from the performance of various algorithms.The best results are highlighted in bold, indicating superior segmentation of the original image.It can be observed that the DEGJO algorithm achieves significant results across most of the images.
Table 8 shows the mean FSIM values by employing the proposed DEGJO and other MA algorithms.The optimal values are highlighted in bold, indicating superior segmentation quality, with higher values reflecting better performance of the thresholding method.
Finally, Figs.4-9 depict the segmentation images using the DEGJO approach at three different levels (k = 3, 5, and 8), alongside their respective histograms.In these figures, the optimal thresholds are indicated by red vertical lines.As shown in Figs.4-9, the contrast quality of the images improves significantly with the increasing number of thresholds.

CONCLUSIONS
Image segmentation is a critical step in the accurate processing and analysis of images.Various techniques using multilevel thresholding have been developed to solve this challenge.Thresholding-based segmentation methods are widely utilized for their simple operation and efficient point characteristics.In this study, we present a hybrid DEGJO algorithm, which uses the MCE as a fitness function to determine optimal threshold values.The DEGJO algorithm aims to obtain the optimal threshold using the MCE method.Experiments are conducted on benchmark functions and images, comparing the performance of the DEGJO algorithm with other metaheuristic algorithms, including DE, GWO, WOA, GJO, and HGJO.The results of these experiments highlight the superior performance of the DEGJO algorithm, evident in its outperformance across various metrics including fitness values, PSNR, SSIM and FSIM, compared to other optimization algorithms.
In future work, we will further optimize the performance of the DEGJO algorithm using actual captured images employ Otsu, Kapur entropy, Fuzzy entropy, and Masi entropy for multilevel thresholding image segmentation.

Table 7 Results of the mean SSIM.
Notes.The best values are highlighted in bold.

Table 8 Results of the mean FSIM.
Notes.The best values are highlighted in bold.